package org.dromara.chicken.domain;

import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonInclude;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.common.tenant.core.TenantEntity;

import java.io.Serial;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 鸡场投喂对象 chicken_feed_out
 *
 * @author Mr Lei
 * @date 2024-05-29
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("chicken_feed_out")
public class ChickenFeedOut extends TenantEntity {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     *
     */
    @NotNull(message = "ID不能为空",groups = {EditGroup.class})
    @TableId(value = "id")
    private Long id;

    /**
     * 标题
     */
    @NotBlank(message = "标题不能为空",groups = {AddGroup.class, EditGroup.class})
    @ExcelProperty(value = "标题")
    private String orderNo;

    /**
     * 饲养员
     */
    private Long workerId;

    /**
     * 孵化批次
     */
    @ExcelProperty(value = "孵化批次")
    private Long chickenHatchId;

    /**
     * 日均采食量
     */
    private BigDecimal dayAverage;

    /**
     * 当日饲料总量
     */
    @ExcelProperty(value = "当日饲料总量")
    private BigDecimal dayFeedNum;

    /**
     * 饲料金额
     */
    @ExcelProperty(value = "当日饲料金额")
    private BigDecimal totalMoney;

    /**
     * 鸡群数量
     */
    @ExcelProperty(value = "鸡群数量")
    private Long chickenNum;

    /**
     * 鸡舍编号
     */
    @ExcelProperty(value = "鸡舍编号")
    private Long chickenHouseId;

    /**
     * 说明备注
     */
    private String remark;

    /**
     * 审核状态
     */
    private Integer auditStatus;

    /**
     * 审核时间
     */
    private Date auditTime;

    /**
     * 审核备注
     */
    private String auditRemark;

    /**
     * 审核人
     */
    private Long auditBy;

    /*info详情*/
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    @TableField(exist = false)
    private List<ChickenFeedOutInfo> contentInfo;
    /*孵化批次别名*/
    @TableField(exist = false)
    private String hatchName;
    /*工人别名*/
    @TableField(exist = false)
    private String workerName;
    /*审核者别名*/
    @TableField(exist = false)
    private String auditName;
    /*创建人别名*/
    @TableField(exist = false)
    private String createByName;

    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    @TableField(exist = false)
    private Double totalFeedNum;


}
